#ifndef __DS1302_H__
#define __DS1302_H__

#include <REGX52.H>
#include "LCD1602.h"

extern char Time[5];//时间数组

#define second_r 0x81
#define second_w 0x80
#define minutes_r 0x83
#define minutes_w 0x82
#define hour_r 0x85
#define hour_w 0x84
#define date_r 0x87
#define date_w 0x86
#define month_r 0x89
#define month_w 0x88
#define year_r 0x8d
#define year_w 0x8c

unsigned char Read_Clock(unsigned char command);
void Write_Clock(unsigned char command,unsigned char date);
void Set_Time();//设置时间
void Read_Time();//读取时间

#endif